<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>打印100以内的奇数while</title>
</head>
<body>
    <script>
    for(var i=0;i<=100;i++){
        if(i%2!==0){
            // 对2取余且等于零
            he=he+i 
            // he=he+i 为最终的值
        }
    }
document.write(he);
           
    </script>
    
</body>
</html>